package com.three.dao;

import com.baor.baseUtil.R;
import com.three.domain.Students;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentDao {
    public int updateStudent(Students students);
    public R updUser(Students student);

    //pageCountStudents
    int PageCountStudents(@Param("xiaoshou_id") Integer xiaoshou_id);
    //    查询在习生列表
    List<Students> studentsList(@Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize,@Param("xiaoshou_id") Integer xiaoshou_id);
    //    添加在习生
    int addstudent(@Param("name") String name,
                   @Param("gender") String gender,
                   @Param("class_name") String class_name,
                   @Param("graduation_date") String graduation_date,
                   @Param("phone") String phone,
                   @Param("emergency_name") String emergency_name,
                   @Param("emergency_contact") String emergency_contact,
                   @Param("home") String home,
                   @Param("user_id") int user_id,
                   @Param("school") String school

                   );
    int addstu(@Param("name") String name,
               @Param("gender") String gender,
               @Param("phone") String phone
               );
    int updateUser_id(@Param("phone") String phone);
    // 更新学生信息
    int updateStudents(Students student);
    int updateUser(Students student);
    // 软删除学生
    int softDeleteStudent(int student_id);
    int softDeleteStudentByuser(int user_id);
    //    关键字搜索在习生总条数
    int PageCountstukey(@Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize, @Param("name")String name, @Param("xiaoshou_id")Integer xiaoshou_id);
    //    关键字查询在习生列表
    List<Students> getStuByName(@Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize, @Param("name")String name,@Param("xiaoshou_id")Integer xiaoshou_id);


    //销售下拉框
    List<Students> xiaoshouList();
    //添加未报名学生
    int addstu_no_sign(@Param("name") String name,
                       @Param("school") String school,
                       @Param("phone") String phone,
                       @Param("xiaoshou_id") int xiaoshou_id
                       );
    //未报名人数
    int pageCoun_no_sign(@Param("pageIndex") Integer pageIndex,
                         @Param("pageSize")Integer pageSize,
                         @Param("start_date") String start_date,
                         @Param("end_date") String end_date,
                         @Param("keyword") String keyword,
                         @Param("xiaoshou_id") Integer xiaoshou_id
                         );
    //未报名学生列表
    List<Students> get_no_sign(@Param("pageIndex") Integer pageIndex,
                               @Param("pageSize")Integer pageSize,
                               @Param("start_date") String start_date,
                               @Param("end_date") String end_date,
                               @Param("keyword") String keyword,
                               @Param("xiaoshou_id") Integer xiaoshou_id
                               );
    //批量删除未报名学生
    int delete_no_sign(@Param("student_id") List<Integer> student_id);
    //批量转移
    int update_no_sign(@Param("student_id") List<Integer> student_id,@Param("xiaoshou_id") int xiaoshou_id);
    //批量转为预招生
    int updateStatus(Students students);
    //销售统计列表
    List<Students> sale_statistics(@Param("start_date") String start_date,
                                   @Param("end_date") String end_date,
                                   @Param("xiaoshou_id") Integer xiaoshou_id
                                   );
    int pageCount_statistics(@Param("date") String date,
                              @Param("xiaoshou_id") Integer xiaoshou_id
                              );
    List<Students> sale_statistics_by_xiaoshou(@Param("date") String date,
                                               @Param("xiaoshou_id") Integer xiaoshou_id,
                                               @Param("pageIndex") Integer pageIndex,
                                               @Param("pageSize") Integer pageSize
                                               );
}
